Skip to content

chore: bump fmt-maven-plugin to 2.29 and enable long string reflowing - #15028

Draft
zhumin8 wants to merge 1 commit into
mainfrom
chore-fmt-plugin-2.29-reflow-long-strings
Draft

zhumin8 wants to merge 1 commit into
mainfrom
chore-fmt-plugin-2.29-reflow-long-strings

Conversation

@zhumin8

@zhumin8 zhumin8 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Converges the PR lint formatter (fmt-maven-plugin) with the librarian generate formatter (google-java-format CLI) so long string literals are reflowed consistently before PRs are merged to main (see #14862, #14896).

Changes

  • Bumps com.spotify.fmt:fmt-maven-plugin from 2.25 to 2.29 in java-shared-config/java-shared-config/pom.xml.
  • Sets <skipReflowingLongStrings>false</skipReflowingLongStrings> so StringWrapper.wrap is executed, matching the default behavior of the google-java-format CLI.
  • Keeps google-java-format explicitly pinned to ${google-java-format.version} (1.25.2), so Librarian does not need any version change.

Follow-up Work

Formatting updates for pre-existing non-complying modules are separated out into follow-up PRs so this java-shared-config update can land cleanly without triggering unrelated downstream test suites:

  • 11 handwritten modules (85 files):
    • sdk-platform-java: gapic-generator-java (10), gax (8), gax-grpc (1), google-cloud-core (3), google-cloud-core-http (1)
    • java-bigquery/google-cloud-bigquery (13)
    • java-bigquery-jdbc (24)
    • java-spanner-jdbc (21)
    • java-storage-nio/google-cloud-nio (2)
    • grpc-gcp-java (1)
    • java-logging-logback (1)
  • 3 protoc-generated modules (15 files, not to be formatted directly):
    • java-datamanager/proto-data-manager-v1 (11), java-marketingplatformadminapi/proto-admin-v1alpha (2), java-grafeas (2)
    • google-java-format 1.25.2 is not idempotent on protoc's descriptorData strings (librarian generate --all runs a single pass matching what is on main, while a second pass modifies them again). .kokoro/build.sh currently excludes proto-google-* rather than proto-*, so those exclusions may need a follow-up before java-shared-config is bumped downstream.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the fmt-maven-plugin version from 2.25 to 2.29 in the pom.xml file and configures the <skipReflowingLongStrings> property to false. There are no review comments to evaluate, and I have no feedback to provide.

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@zhumin8
zhumin8 force-pushed the chore-fmt-plugin-2.29-reflow-long-strings branch from 12e526e to 9a129d2 Compare November 18, 2026 15:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant